﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<!-- 应该在此定义资源字典条目。-->
	<SolidColorBrush x:Key="WindowBackgroundBrush" Color="#F5FBFE" />
			<SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />
			<!--支持QQ2009右键上下文菜单效果的上下文菜单样式-->
			<Style TargetType="{x:Type ContextMenu}">
				<Setter Property="SnapsToDevicePixels" Value="True"/>
				<Setter Property="OverridesDefaultStyle" Value="True"/>
				<Setter Property="Grid.IsSharedSizeScope" Value="true"/>
				<Setter Property="HasDropShadow" Value="True"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate>
							<Border x:Name="Border" BorderThickness="1.3" Background="{StaticResource WindowBackgroundBrush}" BorderBrush="{StaticResource SolidBorderBrush}" Width="{TemplateBinding Width}">
								<Grid x:Name="Gd_Panel">
									<Border HorizontalAlignment="Left" Width="30" Background="#C5EAFE" Margin="0" CornerRadius="5,0,0,5"/>
									<Grid>
										<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" x:Name="Sp_ItemHost"/>
									</Grid>
								</Grid>
							</Border>
							<ControlTemplate.Triggers>
								<Trigger Property="ContextMenu.HasDropShadow" Value="true">
									<Setter TargetName="Border" Property="Padding" Value="1,1,1,1"/>
									<Setter TargetName="Border" Property="CornerRadius" Value="5,5,5,5"/>
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<!--上下文菜单项样式-->
			<Style x:Key="Normal_Style_QQMenuItem" TargetType="{x:Type MenuItem}">
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate>
							<Grid x:Name="gd_outer" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
								<Grid.Triggers>
									<EventTrigger RoutedEvent="Mouse.MouseEnter">
										<BeginStoryboard>
											<Storyboard>
												<DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="bd_back" Storyboard.TargetProperty="Opacity" To="1"/>
											</Storyboard>
										</BeginStoryboard>
									</EventTrigger>
									<EventTrigger RoutedEvent="Mouse.MouseLeave">
										<BeginStoryboard>
											<Storyboard>
												<DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="bd_back" Storyboard.TargetProperty="Opacity"/>
											</Storyboard>
										</BeginStoryboard>
									</EventTrigger>
								</Grid.Triggers>
								<Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Background="#FF00A0D4" CornerRadius="3,3,3,3" Opacity="0" x:Name="bd_back" />
								<Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" CornerRadius="3,3,3,3">
									<ContentControl x:Name="ctc_content" Content="{TemplateBinding HeaderedItemsControl.Header}" Margin="15,0,0,0"/>
								</Border>
							</Grid>
							<ControlTemplate.Triggers>
								<Trigger Property="IsMouseOver" Value="true">
									<Setter TargetName="ctc_content" Property="Foreground" Value="White"/>
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
</ResourceDictionary>